<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>

<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<base href="<%=basePath%>">
		<title>My JSP 'index.jsp' starting page</title>
		<meta content="text/html; charset=UTF-8" http-equiv="content-type">
		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
	</head>

	<body>
		<script type="text/javascript">
   var contextPath = "<%=path%>";// 关键的地方
   </script>
		<script type="text/javascript" charset="UTF-8" src="zhh/js/JsonRpcClient.js"></script>
		<script type="text/javascript">
var myrpc = rpc.getRpcObj("jcore.jsonrpc.rpcobj.RpcContactTree");		
  var testrpc = rpc.getRpcObj("jcore.jsonrpc.rpcobj.MyTestRpc");
  var callrpc = rpc.getRpcObj("jcore.jsonrpc.rpcobj.CommunicateStates");
   function getT1()
   {
   	  alert(testrpc.testGetList());
   }
   function getT()
   {
   	  alert(myrpc.getMedicineTreeRoot());
   	  alert(myrpc.getMedicineTreeRoot().getDName());
   	  alert(myrpc.getMedicineTreeRoot().getContactsList());
   	  alert(myrpc.getRpcTreeNode("0101000000"));
   	  alert(myrpc.getRpcTreeNode("0101000000").getDName());
   	  alert(myrpc.getRpcContactByCId("1000000001").getCName());
   	 
   }
   function getCallState() 
   {
   	  var callstate = callrpc.getCallState("test");
   	  alert(callstate);
   	  callstate.serverIp = "127.0.0.1";
   	  callrpc.setCallState("test",callstate);
   	  
   	  var callstate2 = callrpc.getCallState("test");
   	  alert(callstate2.serverIp);
   }
   
  
   </script>
		普通输入对象：

		<button onclick=getT()>
			获得tree
		</button>
		<button onclick=getT1()>
			获得tree1
		</button>
		<br>
		<br>
		<button onclick=getCallState()>
			获得callstate
		</button>
	</body>
</html>